package com.alibaba.cloud.transmit.controller;

import com.alibaba.cloud.transmit.entity.TransmitData;
import com.alibaba.cloud.transmit.service.TransmitService;
import com.alibaba.framework.domain.ResponseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/transmit")
public class TransmitController {

    @Autowired
    private TransmitService transmitService;

    @PostMapping("/data")
    public ResponseWrapper saveTransmitData(@RequestBody TransmitData transmitData) {

        transmitService.saveTransmitData(transmitData);
        return new ResponseWrapper();
    }
}
